package core.hxl;

import core.hxl.feign.FeignDemo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class CommandLineRunnerImpl implements CommandLineRunner {

    @Autowired
    private FeignDemo feignDemo;

    @Override
    public void run(String... strings) throws Exception {
        log.info("clr start ");
        int i=0;
        while (true){
            System.out.println("result:"+feignDemo.getService(i+""));
            i++;
            Thread.sleep(2000);
        }
    }
}
